<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
	<ul class="nav nav-tabs">
		<li><a href="{:url('Order/question')}">问题列表</a></li>
		<li><a href="{:url('Question/create')}">添加问题</a></li>
		<li class="active"><a href="javascript:void(0);">修改问题</a></li>
	</ul>
	<form action="{:url('Question/updateques',['id'=>$data.question.q_id])}" method="post" class="form-horizontal js-ajax-form margin-top-20">
		<div class="row">
			<div class="col-md-9">
				<table class="table table-bordered">
					<tr>
						<th width="100px">问题<span class="form-required">*</span></th>
						<td>
							<input class="form-control" type="text" name="q_content" 
								   id="q_content" required value="{$data.question.q_content}" placeholder="请输入问题"/>
						</td>
					</tr>
					<foreach name="data.answer" item="v">
						<tr>
							<th width="100px">答案<span class="form-required">*</span></th>
							<td>
								<input class="form-control" type="text" name="a_content[{$v.a_id}]"
									   id="a_content" required value="{$v.a_content}" placeholder="请输入答案"/>
							</td>
						</tr>
					</foreach>
				</table>
				<div class="form-group">
					<div class="col-sm-offset-2 col-sm-10">
						<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('EDIT')}</button>
						<a class="btn btn-default" href="{:url('Order/question')}">{:lang('BACK')}</a>
					</div>
				</div>
			</div>
		</div>
	</form>
</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
<script type="text/javascript">
    //编辑器路径定义
    var editorURL = GV.WEB_ROOT;
</script>
<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript">
    $(function () {

        editorcontent = new baidu.editor.ui.Editor();
        editorcontent.render('content');
        try {
            editorcontent.sync();
        } catch (err) {
        }

        $('.btn-cancel-thumbnail').click(function () {
            $('#thumbnail-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
            $('#thumbnail').val('');
        });

    });



    
</script>
</body>
</html>
